package com.ruoyi.controller;

import com.ruoyi.cyb.botiancybcredit.pojo.ValuationEntity;
import com.ruoyi.cyb.botiancyblogin.Result;
import com.ruoyi.cyb.botiancyblogin.ResultObject;
import com.ruoyi.service.CreditService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 26352
 * @Date 2023/3/23 15:37
 * @Description TODO
 * @Version 1.0
 */
@RestController
@RequestMapping("/credit")
@RefreshScope
public class CreditController {

    @Resource
    private CreditService creditService;


    /**
     * 根据用户id 获取信用评分
     * @return
     */
    @RequestMapping("selectByUid/{uid}")
    public ResultObject selectByUid(@PathVariable Integer uid){
      return  creditService.selectByUid(uid);
    }


    /**
     * 授信调用，生成初始贷款额度
     */
    @RequestMapping("createUpper/{uid}")
    public ResultObject createUpper(@PathVariable Integer uid){
        return  creditService.createUpper(uid);
    }

















}
